import request from '@/utils/request'

enum API{
    TEACHERINFOPAGE = '/teacher/teacherInfoListPage/',
    TEACHERLIST = '/teacher/teacherInfoListPage/',
    ADDTEACHER = '/teacher/addTeacher',
    BATCHDELETE = '/teacher/batchDeleteTeacherInfo?teacherInfoArr=',
    DELETETEACHERBYID = '/teacher/deleteTeacherInfoById/',
    UPDATEACHER = '/teacher/updateTeacher',
}

export const reqteacherInfoPage = (
    currentPage: number,
    limit: number,
    teacherTitle: String,
) => request.post(API.TEACHERINFOPAGE + `${currentPage}/${limit}/${teacherTitle}`)

export const reqTeacherList = (currentPage: number, limit: number)=>request.post(API.TEACHERLIST+`${currentPage}/${limit}`)

export const addTeacher = (teacherParams:any)=>
request.post<any,any>(API.ADDTEACHER,teacherParams)

export const updateTeacher =(teacherParams:any)=>
request.post<any,any>(API.UPDATEACHER,teacherParams)

export const reqBatchDeleteTeacherInfo = (ids:any)=>
    request.delete<any,any>(API.BATCHDELETE + `${ids}`)

export const reqDeleteTeacherById = (deleteId:any)=>
    request.delete(API.DELETETEACHERBYID + `${deleteId}`)
